class Person:
    def __init__(self,name,age): #传参数
        self.name = name
        self.age = age
        self.version = 1.0
        
    def say_hello(self):
        print("hello",self.name)
    def eat_food(self,food):
        print(self.name,"iseating",food)
    def run(self):
        print(self.name,"跑步")
    def __str__(self) -> str:
        return "Person(name={},age={}".format(self.name,self.age)
        
p = Person("尼桑",16)
print(p)
print(p.name)
print(p.age)
print(p.version)
p.say_hello()
p.eat_food("你好")
# p.run()
# print("_______________________")
# p2 = Person("小红",13)
# p2.eat_food("香蕉")